home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_500 / wiconify / wiconsetter.lzh / wIconSetter / Source / wIconFile.h < prev    next >
C/C++ Source or Header  |  1991-04-19  |  3KB  |  106 lines

  1. /*
  2.  *  WICONSETTER     A companion utility to wIconify.  wIconSetter allows
  3.  *                  you to specify custom icons for windows ans screens
  4.  *                  that normally use the default icons.
  5.  *
  6.  *  wIconFile.h     Defines and structures for the initialization file.
  7.  *
  8.  *  Copyright 1990 by Davide P. Cervone, all rights reserved.
  9.  *  You may use this code, provided this copyright notice is kept intact.
  10.  */
  11.  
  12. #define INTUITION_SCREEN_H                  /* don't need 'em */
  13. #include "wIconSetter.h"
  14. #undef PROGRAM
  15.  
  16.  
  17. #define MAXLINE             132
  18. #define MAXWIDTH            78
  19. #define MAXWORDS            5
  20. #define MAXHEIGHT           32
  21. #define MAXDEPTH            5
  22.  
  23. /*
  24.  *  The commands allowed in the initialization file
  25.  */
  26.  
  27. #define COM_NONE            0
  28. #define COM_PROGRAM         1
  29. #define COM_SCREEN          2
  30. #define COM_WINDOW          3
  31. #define COM_ICON            4
  32. #define COM_IMAGE           5
  33. #define COM_SELECT          6
  34. #define COM_MASK            7
  35. #define COM_FLAGS           8
  36. #define COM_POSITION        9
  37. #define COM_NAME            10
  38. #define COM_DEFINE          11
  39.  
  40. #define COM_EOF             99
  41. #define COM_UNKNOWN         100
  42.  
  43. #define COM_LAST            COM_DEFINE
  44.  
  45.  
  46. #define MATCH(n1,n2)        (PrefixMatch(n1,n2)==0 && strlen(n1)==strlen(n2))
  47. #define PREFIXMATCH(n1,n2)  ((n1) == NAME_ANY || PrefixMatch(n1,n2) == 0)
  48. #define WORDMATCH(w)        (stricmp(Word,w) == 0) 
  49.  
  50. struct Flag
  51. {
  52.    char *Name;
  53.    ULONG Flag;
  54. };
  55.  
  56.  
  57. #ifndef FILE
  58. #define FILE    APTR
  59. #endif
  60.  
  61.  
  62. /*
  63.  *  Data shared by all file reading modules
  64.  */
  65.  
  66. extern USHORT ImageData[MAXWORDS][MAXHEIGHT][MAXDEPTH];
  67. extern short MaxWidth,MaxHeight,MaxWords;
  68. extern UBYTE Plane0,Plane1;
  69. extern int ImageType;
  70. extern int IconFileOpen;
  71. extern short BitMapLine;
  72.  
  73. /*
  74.  *  Pointers to the pointer the current instance of each thing:
  75.  */
  76.  
  77. extern ICONPROGRAM  **ProgramPtr;
  78. extern ICONSCREEN   **ScreenPtr;
  79. extern ICONWINDOW   **WindowPtr;
  80. extern ICONWINDOW   **FirstWPtr;
  81. extern ICONDEFINE   **DefinePtr;
  82. extern ICONWINDOW    *IconPtr;
  83. extern struct Image **MaskPtr;
  84. extern int NoIcon;
  85.  
  86. /*
  87.  *  Easy references to the pointers
  88.  */
  89.  
  90. #define ICON        (IconPtr->Icon)
  91. #define MASK        (*MaskPtr)
  92. #define DEFINE      (*DefinePtr)
  93. #define WINDOW      (*WindowPtr)
  94. #define FIRSTWINDOW (*FirstWPtr)
  95. #define SCREEN      (*ScreenPtr)
  96. #define PROGRAM     (*ProgramPtr)
  97.  
  98.  
  99. extern FILE *InFile;                /* The input file pointer */
  100. extern int EndOfFile;               /* TRUE when end-of-file is reached */
  101. extern char NextChar;               /* The next character to process */
  102. extern char Word[MAXLINE+1];        /* The next word to be processed */
  103.  
  104. extern USHORT *AllocRaster();
  105. extern ICONDEFINE *FindDefine();
  106.